# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.Language.V2.Model.XPSSpeechEvaluationMetricsSubModelEvaluationMetric do
  @moduledoc """


  ## Attributes

  *   `biasingModelType` (*type:* `String.t`, *default:* `nil`) - Type of the biasing model.
  *   `isEnhancedModel` (*type:* `boolean()`, *default:* `nil`) - If true then it means we have an enhanced version of the biasing models.
  *   `numDeletions` (*type:* `integer()`, *default:* `nil`) - 
  *   `numInsertions` (*type:* `integer()`, *default:* `nil`) - 
  *   `numSubstitutions` (*type:* `integer()`, *default:* `nil`) - 
  *   `numUtterances` (*type:* `integer()`, *default:* `nil`) - Number of utterances used in the wer computation.
  *   `numWords` (*type:* `integer()`, *default:* `nil`) - Number of words over which the word error rate was computed.
  *   `sentenceAccuracy` (*type:* `float()`, *default:* `nil`) - Below fields are used for debugging purposes
  *   `wer` (*type:* `float()`, *default:* `nil`) - Word error rate (standard error metric used for speech recognition).
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :biasingModelType => String.t() | nil,
          :isEnhancedModel => boolean() | nil,
          :numDeletions => integer() | nil,
          :numInsertions => integer() | nil,
          :numSubstitutions => integer() | nil,
          :numUtterances => integer() | nil,
          :numWords => integer() | nil,
          :sentenceAccuracy => float() | nil,
          :wer => float() | nil
        }

  field(:biasingModelType)
  field(:isEnhancedModel)
  field(:numDeletions)
  field(:numInsertions)
  field(:numSubstitutions)
  field(:numUtterances)
  field(:numWords)
  field(:sentenceAccuracy)
  field(:wer)
end

defimpl Poison.Decoder,
  for: GoogleApi.Language.V2.Model.XPSSpeechEvaluationMetricsSubModelEvaluationMetric do
  def decode(value, options) do
    GoogleApi.Language.V2.Model.XPSSpeechEvaluationMetricsSubModelEvaluationMetric.decode(
      value,
      options
    )
  end
end

defimpl Poison.Encoder,
  for: GoogleApi.Language.V2.Model.XPSSpeechEvaluationMetricsSubModelEvaluationMetric do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
